<template>
	<view class="u-p-20">
		<template v-if="isHtml">
			<view v-html="value"></view>
		</template>
		<template v-else>
			<web-view :src="src"></web-view>
		</template>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src:'',
				isHtml:true,
				value:''
			}
		},
		onLoad(e) {
			if(e.src.includes('id')){
				this.isHtml = true
				uni.request({
					url:e.src,
					success: (res) => {
						this.value = res.data.data.content
						uni.setNavigationBarTitle({
							title:res.data.data.title
						})
					}
				})
			}else{
				this.isHtml = false
				this.src = e.src
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
